<template>
  <div class="container">
    <div class="terminal-info-content" v-if="customData.agentNo">
     
      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="所属代理商："
        :value="customData.agentName"
      />
      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="机具SN号："
        :value="customData.serialno"
        ><i
          slot="right-icon"
          class="iconfont icon-niantie"
          @click="copy(customData.serialno)"
        ></i
      ></u-cell-item>

      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="商户名称："
		v-if="merchData.merchName"
        :value="merchData.merchName"
      />

      <u-cell-item
        :arrow="false"
        hover-class="none"
		v-if="merchData.merchNo"
        title="商户编号："
        :value="merchData.merchNo"
      />

      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="产品政策："
        :value="customData.policyName"
      />
	  
	  <u-cell-item
	    :arrow="false"
	    hover-class="none"
	    title="绑定状态："
	    :value="customData.bindStatus == 0 ? '未绑定' : '已绑定'"
	  />

      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="贷记卡费率(%)："
        :value="customData.payCreditRate"
      />
<!--      <u-cell-item
        :arrow="false" v-show="channel == 'liaoyuan'"
        hover-class="none"
        title="云闪付费率(%)："
        :value="customData.quickCreditRate"
      /> -->
	  
<!-- 	  <u-cell-item
	    :arrow="false"
	    hover-class="none"
	    title="支付宝费率(%)："
	    :value="customData.zfbRate"
	    class="agent-info-list-cell"
	  /> -->

<!--      <u-cell-item
        :arrow="false"
        hover-class="none"
        title="微信费率(%)："
        :value="customData.wxRate"
        class="agent-info-list-cell"
      /> -->
	  
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="银联扫码费率(%)："
	    :value="customData.unionPayRate"
	    class="agent-info-list-cell"
	  /> -->
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="贷记卡提现费(元)："
	    :value="customData.payCreditWithdrawalFee"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="汇收银扫码费率："
	    :value="customData.jhPayRate"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="汇收银扫码提现费："
	    :value="customData.jhPayWithdrawalFee"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="聚收银扫码费率："
	    :value="customData.jhptPayRate"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="聚收银扫提现费："
	    :value="customData.jhptPayWithdrawalFee"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="一码聚扫码费率："
	    :value="customData.zyPayRate"
	    class="agent-info-list-cell"
	  />
	  
	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="一码聚扫提现费："
	    :value="customData.zyPayWithdrawalFee"
	    class="agent-info-list-cell"
	  />
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel === 'liaoyuan'"
	    hover-class="none"
	    title="提现费(元)："
	    :value="customData.additionalPro"
	    class="agent-info-list-cell"
	  /> -->
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="云闪付提现费(元)："
	    :value="customData.quickCreditWithdrawalFee"
	    class="agent-info-list-cell"
	  /> -->
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="银联扫码提现费(元)："
	    :value="customData.unionPayWithdrawalFee"
	    class="agent-info-list-cell"
	  /> -->
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="支付宝提现费(元)："
	    :value="customData.alipayWithdrawalFee"
	    class="agent-info-list-cell"
	  /> -->
<!-- 	  <u-cell-item
	    :arrow="false" v-if="channel !== 'liaoyuan'"
	    hover-class="none"
	    title="微信提现费(元)："
	    :value="customData.wxWithdrawalFee"
	    class="agent-info-list-cell"
	  /> -->
	
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      navBarOptions: {
        title: "详情",
        router: { name: "changeMerc" },
        backPrevPage: true,
      },
      customData: {},
	  channel:"",
	  merchData: {}
    };
  },
  created() {
	  this.customData=null;
    let option = this.$storage.getStore("changeMercDetail") || {};
	this.channel = this.$storage.getStore("channleCodes") || {};
    this.customData = option;
  },
  onUnload() {
  	this.$storage.removeStore('changeMercDetail');
	this.$storage.removeStore('merchDetail');
	this.$storage.getStore("channleCodes") 
  },
  onLoad(option) {
	  console.log("接受参数")
	  console.log(option.type)
	  if(option.type == "merch") {
		  this.merchData = this.$storage.getStore("merchDetail") || {};
	  }
  },
  methods: {
    copy(value) {
      let _this = this;
      uni.setClipboardData({
        data: value,
        success: function () {
          _this.$tip.toast("复制成功!");
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.container {
  padding-top: R(20);
}
.terminal-info-content {
  margin: 0 R(20px);
  border-radius: R(20);
  background: #fff url(../../../common/images/newIcon/com-bg2.png) no-repeat;
  background-size: 100% auto;
}
.u-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 19px;
    font-size: 16px;
    line-height: 32px;
    color: #606266;
    background-color: #fff;
    text-align: left;
}
</style>
